<!-- Header -->
<template>
  <div class="header">
    <div class="header-back">
      <i class="iconfont back-icon">&#xe624;</i>
    </div>
    <div class="header-search">
      <i class="iconfont">&#xe632;</i>
      输入城市景点游玩主题
    </div>
    <router-link to="/city">
      <div class="header-site">
        {{city}}
        <i class="iconfont site-icon">&#xe6aa;</i>
      </div>
    </router-link>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: 'Header',
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['city'])
  }
}

</script>
<style lang="stylus" scoped>
@import '~styles/varibles.styl';
.header
  display flex
  line-height $headerHeight
  background-color $bgColor
  font-size .32rem
  color #fff
  .header-back
    width .64rem
    float left
    .back-icon
      display block
      text-align center
      font-size .4rem
      font-weight bold
  .header-search
    flex:1
    height .64rem
    line-height .64rem
    margin-top .11rem
    margin-left .2rem
    padding-left .2rem
    background-color #fff
    border-radius .1rem
    color #ccc
  .header-site
    float right
    margin-left .2rem
    margin-right .2rem
    color #fff
</style>
